package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;
import java.util.List;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class MealbarPromoRenderer implements Sequenceable, Serializable {

    @SerializedName("triggerCondition")
    private String triggerCondition;
    @SerializedName("trackingParams")
    private String trackingParams;
    @SerializedName("impressionEndpoints")
    private List<ImpressionEndpointsItem> impressionEndpoints;
    @SerializedName("dismissButton")
    private DismissButton dismissButton;
    @SerializedName("icon")
    private Icon icon;
    @SerializedName("actionButton")
    private ActionButton actionButton;
    @SerializedName("messageTexts")
    private List<MessageTextsItem> messageTexts;
    @SerializedName("messageTitle")
    private MessageTitle messageTitle;
    @SerializedName("style")
    private String style;
    @SerializedName("isVisible")
    private boolean isIsVisible;


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.triggerCondition);
        parcel.writeString(this.trackingParams);
        parcel.writeList(this.impressionEndpoints);
        parcel.writeSequenceable(this.dismissButton);
        parcel.writeSequenceable(this.icon);
        parcel.writeSequenceable(this.actionButton);
        parcel.writeList(this.messageTexts);
        parcel.writeSequenceable(this.messageTitle);
        parcel.writeString(this.style);
        parcel.writeBoolean(this.isIsVisible);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.triggerCondition=parcel.readString();
        this.trackingParams=parcel.readString();
        this.impressionEndpoints = parcel.readSequenceableList(ImpressionEndpointsItem.class);
        parcel.writeSequenceable(this.dismissButton);
        parcel.writeSequenceable(this.icon);
        parcel.writeSequenceable(this.actionButton);
        this.messageTexts = parcel.readSequenceableList(MessageTextsItem.class);
        parcel.writeSequenceable(this.messageTitle);
        this.style = parcel.readString();
        this.isIsVisible = parcel.readBoolean();
        return true;
    }

    @Override
    public String toString() {
        return "MealbarPromoRenderer{" +
                "triggerCondition = '" + triggerCondition + '\'' +
                ",trackingParams = '" + trackingParams + '\'' +
                ",impressionEndpoints = '" + impressionEndpoints + '\'' +
                ",dismissButton = '" + dismissButton + '\'' +
                ",icon = '" + icon + '\'' +
                ",actionButton = '" + actionButton + '\'' +
                ",messageTexts = '" + messageTexts + '\'' +
                ",messageTitle = '" + messageTitle + '\'' +
                ",style = '" + style + '\'' +
                ",isVisible = '" + isIsVisible + '\'' +
                "}";
    }

    public String getTriggerCondition() {
        return triggerCondition;
    }

    public void setTriggerCondition(String triggerCondition) {
        this.triggerCondition = triggerCondition;
    }

    public String getTrackingParams() {
        return trackingParams;
    }

    public void setTrackingParams(String trackingParams) {
        this.trackingParams = trackingParams;
    }

    public List<ImpressionEndpointsItem> getImpressionEndpoints() {
        return impressionEndpoints;
    }

    public void setImpressionEndpoints(List<ImpressionEndpointsItem> impressionEndpoints) {
        this.impressionEndpoints = impressionEndpoints;
    }

    public DismissButton getDismissButton() {
        return dismissButton;
    }

    public void setDismissButton(DismissButton dismissButton) {
        this.dismissButton = dismissButton;
    }

    public Icon getIcon() {
        return icon;
    }

    public void setIcon(Icon icon) {
        this.icon = icon;
    }

    public ActionButton getActionButton() {
        return actionButton;
    }

    public void setActionButton(ActionButton actionButton) {
        this.actionButton = actionButton;
    }

    public List<MessageTextsItem> getMessageTexts() {
        return messageTexts;
    }

    public void setMessageTexts(List<MessageTextsItem> messageTexts) {
        this.messageTexts = messageTexts;
    }

    public MessageTitle getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(MessageTitle messageTitle) {
        this.messageTitle = messageTitle;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public boolean isIsVisible() {
        return isIsVisible;
    }

    public void setIsVisible(boolean isVisible) {
        isIsVisible = isVisible;
    }
}
